requirejs.config({
  shim: {
    'underscore': {
      exports: '_'
    },
    'backbone': {
      deps: ['underscore', 'jquery'],
      exports: 'Backbone'
    },
    'bootstrap': {
      deps: ['jquery'],
      exports: 'bootstrap'
    }
  },
  /**
   * HACK:
   * Modified Underscore and Backbone to be AMD compatible (define themselves)
   * since it didn't work properly with the RequireJS shim when optimizing
   */
  paths: {
    'text': 'lib/text',
    'jquery': 'lib/jquery',
    'underscore': 'lib/underscore-amd',
    'backbone': 'lib/backbone-amd',
    'bootstrap': 'lib/bootstrap',
    'moment': 'lib/moment',
    'Mediator': 'lib/mediator',
    'App': 'app',
    'Router': 'router',
    'api': 'api',

    'HomeView': 'views/home',

    // shop around
    'ShopAroundView': 'views/shopAround/index',
    'WareListView': 'views/shopAround/wareList',
    'OrderListView': 'views/order/list',

    'LocationModel': 'models/location',
    'LocationCollection': 'collections/location',
    'CategoryModel': 'models/category',
    'CategoryCollection': 'collections/category',
    'OrderModel': 'models/order',
    'OrderCollection': 'collections/order',
    //'CategoryCollection': 'collections/category',

  }
});

require(['App'], function (App) {
  App.initialize();
});
